//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CDIRSTRENUMERATOR_H__
#define __CDIRSTRENUMERATOR_H__

class CDirStrEnumerator : public IWStringEnumerator
{
public:
    CARAPI_(PInterface) Probe(
         /* [in]  */ REIID riid);

    CARAPI_(UInt32) AddRef(void);

    CARAPI_(UInt32) Release(void);

    CARAPI Aggregate(
        /* [in] */ AggrType aggrType,
        /* [in] */ PInterface pObject);

    CARAPI GetDomain(
         /* [out] */ PInterface *ppObj);

    CARAPI Current(
        /* [out] */ WStringBuf * pPsa);

    CARAPI MoveNext(
        /* [out] */ Boolean* pSucceeded);

    CARAPI Reset();

    CDirStrEnumerator();
    CDirStrEnumerator(wchar_t *wcsPathName);
    virtual ~CDirStrEnumerator();

private:
    // TODO: Add you private member variables here
    wchar_t* m_wstrPathName;
    _ELASTOS Boolean m_bReset;
    _ELASTOS Boolean m_bMove;
    wchar_t m_wcsFileName[MAX_PATH];
    HANDLE m_hFind;
    Interlocked     m_cRef;
};

#endif // __CDIRSTRENUMERATOR_H__
